﻿using System;

namespace AgNet.Exceptions
{
    public class AgException : Exception
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="T:AgException"/> class.
        /// </summary>
        public AgException(string message, int error)
            : base(message)
        {
            this.Error = error;
        }

        /// <summary>
        /// Gets the error code value from Ag API
        /// </summary>
        public int Error { get; private set; }
    }
}
